{% extends 'base.html' %}
{% block title %}Permission Groups{% endblock %}
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/permgroups.css" />
{% endblock %}
{% block content %}
  {% pp_permgroup_list %}
	<div id = "groupList">
	<div class="titleText">Group List</div>
    {% for group in pp_permissions.groups %}
		<div class = "group">
      		<span class="name">{{ group.name }}</span><span class="active">{% if group.is_active %} Active {% else %} Inactive {% endif %} </span><span class="description">{{ group.description }}</span>
		</div>
	{% empty %}
		There are no groups at this time
	{% endfor %}
	</div>
  {% endpp_permgroup_list %}
  {% pp_permgroup_form POST=request.POST path=request.path %}
    <form method="post">
	<div class ="titleText">Add a Group </div>
	
	<div class="roundbox">
		<span class= "title">group name</span>
		<div id="name">{{ pp_permissions.form.name }}</div>
	</div>
	<div class="roundbox">
		<span class= "title">group description</span> 
		<div id ="description">{{ pp_permissions.form.description }}</div>
	</div>
	<div class="roundbox">
		<div id="active"> <span class= "title">currently active: </span>
		 {{ pp_permissions.form.is_active }}</div>
	</div>
	<div id="submit">
		<input type="submit">
	</div>
    {{ pp_permissions.form.form_id }}
    {% csrf_token %}
    </form>
  {% endpp_permgroup_form %}
{% endblock content %}